package com.spring.demo3.eg2;

/**
 * @author vhans
 */
public class Blog {
    private String title;

    // 博客内容较多，使用懒加载出现
    private BlogContent blogContent;

    public Blog() {
        this.title = "spring aop";
        this.blogContent = this.initBlogContent();
    }

    public BlogContent initBlogContent() {
        // 懒加载的方式获取博客内容
        return BlogLazyLoader.createProxy(new BlogContent());
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public BlogContent getBlogContent() {
        return blogContent;
    }

    public void setBlogContent(BlogContent blogContent) {
        this.blogContent = blogContent;
    }
}
